<!DOCTYPE html>
<html>
<head>
    {include file="common/head"}
</head>
<body>
<div class="body-inner">
    {include file="common/menu"}
    <!--获取内页横幅的第二张-->
    {hkcms:adv name="sub" itemid="2"}
    <div id="banner-area" class="banner-area" style="background-image:url({$item.image})">
        <div class="banner-text">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="banner-heading">
                            {// $Cate 存在于栏目首页、栏目列表页，里面是栏目的信息}
                            <h1 class="banner-title">{$Cate.title}</h1>
                            {// 面包屑导航，symbol 是分隔符，class是html class,赋值给a标签，更多参数前往手册查看}
                            <nav aria-label="breadcrumb" class="mt-4">{hkcms:breadcrumb class="active_a" symbol=" / " /}</nav>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {/hkcms:adv}

    <!--产品展示-->
    <section class="project-area home-product">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    {// 产品筛选，multiple="1" 表示多选，在字段管理里面可以设置字段筛选。}

                    <div class="filter bg-light">
                        {hkcms:filter multiple="1" }
                        <div class="option clearfix">
                            {// 注意这里的语言包，即使是中文字符我们在en.json里面一样可以配置中英对照，若有其他语言也是一样的写法}
                            <div class="option-title">{:__($item.title)}：</div>
                            <ul class="clearfix">
                                {// 循环输出筛选选项}
                                {hkcms:volist name="item.option" id="vo"}
                                <li><a class="{$vo.currentstyle}" href="{$vo.url}">{:__($vo.title)}</a></li>
                                {/hkcms:volist}
                            </ul>
                        </div>
                        {/hkcms:filter}

                        {// 产品排序，在字段管理里面可以设置字段排序。}
                        <div class="option clearfix">
                            <div class="option-title">{:__('Weigh')}：</div>
                            <ul class="clearfix">
                            {hkcms:order currentstyle="active"}
                                <li>
                                    <a href="{$item.url}" class="{$item.currentstyle}">
                                        {if $key==0}
                                        {:__($item.title)}
                                        {elseif ($item.order=='asc')}
                                        <i class="fas fa-long-arrow-alt-down"></i> {:__($item.title)}
                                        {else /}
                                        <i class="fas fa-long-arrow-alt-up"></i> {:__($item.title)}
                                        {/if}
                                    </a>
                                </li>
                            {/hkcms:order}
                            </ul>
                        </div>
                    </div>


                </div>
            </div>

            <!--产品栏目-->
            <div class="row">
                <div class="col-lg-5">
                    <div class="section-title"><h4>{:__('List')}</h4></div>
                </div>
                <div class="col-lg-7">
                    <div class="property-controls">
                        <ul class="nav nav-tabs" role="tablist">
                            {if $Cate.parent_id}
                                {// 获取同级栏目，可以将产品展示改成列表页，选择当前列表页，并将下面的注释取消掉}
                                <!--<li><a class="" href="{$Cate.parent_url}">{:lang('All')}</a></li>-->
                                {hkcms:channel name="$Cate.id" type="peer"}
                                <li><a href="{$item.url}" {if $item.id==$Cate.id}class="active"{/if} >{$item.title}</a></li>
                                {/hkcms:channel}
                            {else /}
                                {// 获取下级栏目，可以将产品展示改成列表页，选择当前列表页，并将下面的注释取消掉}
                                <!--<li><a class="active" href="{$Cate.parent_url}">{:lang('All')}</a></li>-->
                                {hkcms:channel name="$Cate.id" type="son"}
                                <li><a href="{$item.url}" {if $item.id==$Cate.id}class="active"{/if} >{$item.title}</a></li>
                                {/hkcms:channel}
                            {/if}
                        </ul>
                    </div>
                </div>
            </div>
            <!--产品栏目 结束-->

            <div class="tab-content">
                <div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
                    <div class="row property-filter tab-content">
                        {// 在列表页无需写catid=""，默认就是当前列表页下的数据}
                        {hkcms:content num="$Cate['num']" order="weigh desc,publish_time desc" page="1"}
                        <div class="col-lg-4 col-md-6 mix all">
                            <div class="property-item">
                                <a href="{$item.fullurl}">
                                    <div class="pi-pic set-bg" style="background-image: url('{$item.thumb|default=''}');">
                                        <div class="label c-magenta">{$item.category.title}</div>
                                    </div>
                                </a>
                                <div class="pi-text">
                                    <a href="{$item.fullurl}" class="heart-icon"><span class="fas fa-meteor"></span> {$item.views}</a>

                                    {// if语句的使用，下面是判断价格大于0就显示价格，反之显示咨询 }
                                    {if !empty($item.price) && $item.price>0}
                                    <div class="pt-price text-danger">¥ {$item.price|default=""}</div>
                                    {else /}
                                    <div class="pt-price text-warning">{:__('Consult')}</div>
                                    {/if}

                                    {// $item.fullurl是包含域名的url地址 }
                                    <h5><a href="{$item.fullurl}" title="{$item.title}">{$item.title}</a></h5>
                                    <div class="desc">{$item.description}</div>
                                </div>
                            </div>
                        </div>
                        {/hkcms:content}
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-12">
                    <div class="general-btn text-center" style="margin-top: 10px">
                        {hkcms:contentpage item="home,pre,pageno,next,last,info" mobile_item="pre,pageno,next" pre="&laquo;" next="&raquo;" /}
                    </div>
                </div>
            </div>
        </div><!--container 结束-->
    </section>
    <!--产品展示 结束-->

    {include file="common/footer"}
</div>
</body>
</html>
